#ifndef MUSICSILDER_H
#define MUSICSILDER_H

#include <QWidget>

namespace Ui {
class MusicSilder;
}

class MusicSilder : public QWidget
{
    Q_OBJECT

public:
    explicit MusicSilder(QWidget *parent = nullptr);
    ~MusicSilder();

    void moveSilder();

    void moveStep(float bf);
    //重写拖拽相关的函数
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event) ;
signals:
    void setMusicPos(float ration);
private:
    Ui::MusicSilder *ui;

    int currentPos;//outsilder现在在的位置
    int maxWidth;//最大宽度,
};

#endif // MUSICSILDER_H
